<%@ page contentType="text/html;charset=UTF-8" %>

<script type="text/javascript" src="${ctx}/static/jquery.flexslider/jquery.flexslider-min.js"></script>
<script>
    $(".flexslider").flexslider({
        slideshowSpeed: 5000, //展示时间间隔ms
        animationSpeed: 1000, //滚动时间ms
        start: function (slider) {
            var url = $('.flexslider .flex-active-slide').data('url');
            $('.banner-bg').css('background-image', 'url(' + url + ')');
        },
        before: function (slider) {
            var url = $($('.flexslider .slide-item')[slider.animatingTo]).data('url');
            $('.banner-bg').css('background-image', 'url(' + url + ')');
        }
    });
</script>